/**
 * Copyright &copy; 2012-2015  All rights reserved.
 */
package com.smartwork.common.mobile.wechat.bean;

import org.hibernate.validator.constraints.Length;

import com.smartwork.common.persistence.DataEntity;

/**
 * WechatInfoEntity
 * @author wj
 * @version 2016-06-30
 */
public class WechatInfo extends DataEntity<WechatInfo> {
	
	private static final long serialVersionUID = 1L;
	private String groupId;		// 公众号ID
	private String relationId;		// 关联用户ID
	private String openId;		// 微信OPENID
	private String unionId;		// 微信UNIONID
	private String sex;		// 用户性别
	private String nickName;		// 用户昵称
	private String province;		// 省
	private String city;		// 市
	private String country;		// 国家
	private String headImage;		// 头像
	private String privilege;		// 用户权限
	
	public WechatInfo() {
		super();
	}

	public WechatInfo(String id){
		super(id);
	}

	@Length(min=0, max=20, message="公众号ID长度必须介于 0 和 20 之间")
	public String getGroupId() {
		return groupId;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}
	
	@Length(min=0, max=50, message="关联用户ID长度必须介于 0 和 50 之间")
	public String getRelationId() {
		return relationId;
	}

	public void setRelationId(String relationId) {
		this.relationId = relationId;
	}
	
	@Length(min=0, max=50, message="微信OPENID长度必须介于 0 和 50 之间")
	public String getOpenId() {
		return openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}
	
	@Length(min=0, max=50, message="微信UNIONID长度必须介于 0 和 50 之间")
	public String getUnionId() {
		return unionId;
	}

	public void setUnionId(String unionId) {
		this.unionId = unionId;
	}
	
	@Length(min=0, max=1, message="用户性别长度必须介于 0 和 1 之间")
	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}
	
	@Length(min=0, max=50, message="用户昵称长度必须介于 0 和 50 之间")
	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}
	
	@Length(min=0, max=10, message="省长度必须介于 0 和 10 之间")
	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}
	
	@Length(min=0, max=20, message="市长度必须介于 0 和 20 之间")
	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}
	
	@Length(min=0, max=20, message="国家长度必须介于 0 和 20 之间")
	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}
	
	@Length(min=0, max=500, message="头像长度必须介于 0 和 500 之间")
	public String getHeadImage() {
		return headImage;
	}

	public void setHeadImage(String headImage) {
		this.headImage = headImage;
	}
	
	@Length(min=0, max=200, message="用户权限长度必须介于 0 和 200 之间")
	public String getPrivilege() {
		return privilege;
	}

	public void setPrivilege(String privilege) {
		this.privilege = privilege;
	}
	
	@Override
	public String getSeqName() {
		return "buss_wechat_info.id";
	}
}